More reorginising. Actual fix to reflection code.