Refactoring things according to the review on the pull request.