[WIP] Codegen errors

- [x] Remove duplication of interfaces
- [x] Fix fatal errors
I see now. This fix is still incorrect though IMO: why is the method defined in first place?