WIP: Reasonably major refactor