Quick prototype refactor.