pep8 fixes to commands.py and change function name
pep8/pyflakes fixes
Moving things around post-review