Refactored variable names to be less confusing