Refactoring. More comments.