[WIP] Codegen errors

- [x] Remove duplication of interfaces
- [x] Fix fatal errors
To be more clear: why was `__sleep()` included in the overridden methods if it is actually a special case?