- Improve code reuse. - Add missing type hints, fix existing ones and convert them to PEP 484 style. - Add missing imports and clean up existing ones. - Add missing docstrings and clean up existing ones.