Add some documentation comments.
Improve readability of password code.