Minor refactoring and naming