Clean up and document a bit
Merge branch 'master' of https://github.com/ateucher/useful_code