WIP complete refactor.