Refactoring variable names and adding comments.