Refactoring the gem for cleanliness