Remove support for type hints.
Bugfix: Unlock thread mutex while waiting for events.
Implement calling Python functions.