Finish bulk of the refactor.