Refactoring and clean up
Added unit tests and unit test depenencies
Fixing unit tests
Fixing unit tests

Fixing the subscription api
Fixed premature unsubscription bug