documenting and tidying code
Merge branch 'master' of https://github.com/dobsoe/TRG