Porting in groovy of AppModule class