Some refactoring in the user class to reflect the documentation.