Singleton implmentation updated to allow easy subclassing