Major tidy up.  Grouped files into sensible folders, removed old code, hunted out all compiler warnings in code.