So... much... refactoring...