added the option to destroy the context, also improved the examples