Various fixes

- fix type hinting
- fix annotations
- remove useless aliases
- remove useless variables
- fix CS