recommiting source to resolve github issues

classes mixed up and code missing from Rory's latest commit. Github
seemed to try mix and match between my last commit and his. Hopefully
will be ok now