Refactoring wooo!