Implement Cancellation support

This takes care of #88 
Braces around If