Another major refactor.