Added Singleton factory pattern