Cleans up a lot of things...

* coding standard and style fixes
* unit test cleanups
* fixes some return values
* removes Singleton object