Correct deficiencies pointed out by flake8 static analyzer
Move common load/store password functions into module.
Make installable package (via setuptools).