Minor refactoring to make variable naming consistent