refactor TypeClassDecl
add OptimizedCodeGenerator
refactor CodeGenerator