Clean up some code and make output more pep8y