Reorder imports.
Add requirements.txt for pip.
Switch utf8 password encode to ascii.
Fix line continuation indentation.
Fix error when requesting stats that do not exist.