[WIP] Codegen errors

- [x] Remove duplication of interfaces
- [x] Fix fatal errors
`new self()` should work, I think. Give it a spin