Replace nested deferred callback with promiser

Should resolve #130.