Refactoring and comments.