Made a sensible refactor.