Refactor continued.
The big refactor should be ready.