Doing a little refactoring