Some little refactoring to please nazi std :)