Do some little refactoring