Simplify main; extract to Controller.exec_cmdloop

Also reduce # of flake8 warnings from 54 to 49.
Merge pull request #523 from msabramo/simplify_main

Simplify main; extract to Controller.exec_cmdloop