Adding a cancel functionnality (issue #35)

Here is a pull request that implements the Cancel functionality