Implement Cancellation support

This takes care of #88