Modify Singleton to use name of class rather than class object and minor fixes to stop compiler warnings.