Refactored and improved cleanness