Did some satisfying refactoring