A little refactor