Mid refactor.