Refactored to maintain cleanliness and standards