comments and refactor.