Add comments and seperate code into sensible files for easy of maintenance
Merge branch 'master' of github.com:russormes/cps