A little refactoring
Some more refactoring