Minor commenting and refactoring.