adding tests for the discovery
adding more tests
implemented the tests for subscription
implemented most of the test suite. Can be run (from a web accssible server with mocha test.js