Matches flake8, improved unit tests, fixed password functions

Actually selected development branch this time.  Sorry about cleanup on other branch.