Memleak fix branch

A bunch of fixes for memleaks and a recursion limit error.
Also a few a few stack unwinding refactors.
maybe add a dot here
```
from .taskmanager import TaskManager
```