Better Deferred API

Fixes #13.