port to duo, swap callback and ready event
Merge pull request #18 from segmentio/swap/callback

port to duo, swap callback and ready event