Full refactor.