changes to code gen, simplified message builder