port to duo, swap callback and ready event

/cc @ianstormtaylor ported to duo to make testing easier (woot!), and also swapped the emit('ready') and callback.