move to sensible source root
tidyup, split out classes, lots of comments