Ok here's just a few thoughts - do note it's only my opinion.
ANYONE who removes a major food group from the standard UK diet of their growing child without some kind of proper ongoing medical supervision and preferrably a clinical dietician overseeing the new dietry regime risks doing more harm than good long term.
It's not just a question of removing the offending item from a child's diet but of ensuring that nutrients typically contained in the foods no longer on the menu are still in the child's diet. e.g Vegans often suffer B12 defiency, not having dairy means my son's diet has to contain other foods that contain all the fat soluble vits (mostly B's) that a typical milk drinker would be getting as a matter of course as well as the obvious calcium. A hell of lot of cereals and bread etc in this country is fortified with iron and vitamins. You need to be sure the new foods contain these trace nutrients in the same amounts.
Having said all that DS would be dead if we hadn't discovered what dairy does to him as a baby so I'm sure diet does have a massive effect for SOME individuals.
The GAPS diet is an interesting dietry plan that many have found helpful - the book is reasonably priced and it's gluten free and might give you some ideas of the kinds of foods that boost cognitive function.
If you've had issues understanding the Sunderland protocol then you might find the hair testing people foresight helpful.
www.foresight-preconception.org.uk/forms.aspx I use them periodically as non-invasive way of checking my lad has no deficiencies, as the GP only seems to test for iron and calcium and I've noted for instance a link between my son's magnesium levels and his anxiety/adhd type behavior. My lad was under the hospital from 0-4 so nowadays it's just a maintenance check for me to ensure he's not running low on any obscure vitamin, and to help me tweak (not totally change!) his diet occasionally. I don't think it shows intolerances but it'll highlight if your child is deficient in anything that affects cognition.
As far as I understand it dairy intolerance can be identified within a month of stopping, whereas it takes a minimum of 6 months for the removal of gluten to show in a child's behavior, bowels etc.
I'm currently researching pro-biotics for helping the bowel, as the obvious - natural yoghurt is a no-go for my lad. They do seem to help but I get the feeling I haven't quite found the right brand of dairy-free supplement yet iykwim. The differents brands seem to vary a lot in quality.
This might be tmi but bananas and eggs help solidfy very runny poo. My family are big fruit and veg eaters so have learned this trick. A boiled egg for brekkie and a banana for mid-morning snack might help a little (not pretending it'll be a cure, just that it might help a little).
High quality mercury-free fish oils have been clinically proved to help cognitively (granny and her spoonful of codliver oil had a point), and several people on this board seem to like a supplement called behavior balance. Personally I've been suprised by how helpful magnesium supplemets and epsom baths have been in helping my lad sleep, but it took 3 months to see the improvement.