Various fixes
Attempt 1 at imcluding modified emf-generated code into this repo
Merged conflict