Refactored code for consistent variable and function names.