Improved naming and refactoring