Simplify task manager stuff

Closes #1
Thanks @zml2008