c: Some more generator refactoring
delphi: Removed unused code from generator
Refactor more common code in the generator
c: Refactor generator into classes