Improve the generator:

- Import declaration for type in the same packages are not generated
- Method duplicates from multiple inheritance/implementation are fixed