Resolve various compilation problems when building model metdata.
Add remove methods to generated classes
Add a bunch of comments to methods in the generated classes