Add comments. Make simple refactoring.