Style refactoring, add comments.