Added context support to callback
Updated examples and docs
fixed cast for callback