more cleanup on java code generation