[WIP] Codegen errors

- [x] Remove duplication of interfaces
- [x] Fix fatal errors
This is not PSR-2 compliant, as there is more than 1 argument per row (phpcs can tell you more about this)