Minor refactoring and terminology clean-up