Moar refactor.