Fixed struct generation. Added field type rule and generation for constants.