Always return boolean from hasAnnotation
Don't let chunk go over 500 for now

Until dynamic chunking has some bedding in
Cleanup: no functional changes

- Typehints
- Unused imports
- Some indentation