Do a little refactorings.