New Extension and a little refactoring