Refactoring of code structure and naming for codegen core and ide part