A little refactoring goes a long way