More minor refactoring (variable and function naming)