- made Dispatcher static.
- added cleanup code for singletons.
- fixed unit test code.