Refactoring time!