Whitespace. Sorry, I had to. (Mostly by pycharm)
add use logging instead of print; little bit of DRY; touch up arg parsing; add some tests