Further cleanup

Migrated from Notepad++ to Pycharm. Cleaned up a few typos, variables
and warnings.