Return task object when a task is created

Please let me know if there is anything else I need to do to have this accepted.

Fixes #37