API changes, refactored slightly, added option

Quick hack to make it possible to serialize enqueued tasks.