Refactored code to use consistent naming.