Super-complex, massive refactoring