Some little refactoring.