Fix a few warnings and clean-up the generated code a bit.
Handle the unknown JSON fields without removing from lists.
Refactor the addGlobal function to make them smaller.
Remove warnings.
Refactor the addGlobal functionality to make it smaller in all the
generated entity wrappers.
Simplify generated toJson methods.
Merge pull request #146 from kasperl/minor_cleanups

Minor cleanups of the generated code