Refactoring and renaming for consistency