Some more little refactorings