Finalizing major refactor.