Added off function

While having in mind the need for a new API I decided to implement the
off function fairly simply in this way.

This should fix #2
comments