reorganize and clean up the code a bit
Merge branch 'master' of https://github.com/ajwerner/safe