Some comments and refactoring. General.