And here comes a very large refactoring.