A bunch of little fixes found during addition of calamari_nosetest task

Randomish misc.py cleanups, documentation, dead code excision