added type hints refactored some things

20x speed up?