Initial refactor.