some more code refactoring
added some comments to explain some of the doings
prep for release 1.1.1-mc1.7.2