A little refactorization.