Unbind

As requested in #198, here is an attempt at adding unbind support. There are some simple tests included, but they are not complete. Depends on #221.