Refactoring code, it's still working, I promise!