Total refactor.