Add 'unregister' feature
Removed a debug line
Added tests and fixed code-style
Merge pull request #10 from wibblymat/unregister

Add 'unregister' feature