WIP: Finish the refactor.