Moved all the primitive type definition into script.
Addess struct declaration problem in generate code.