big fat smelly refactor