Clean and refactored