Refactoring, clarified comments.