Significantly refactor.