reworked code generation so it is language and file independent.