First refactor.