Merging refactor progress from MB6

Yay, refactoring!