Address some CR comments and fix IDEA gen