Combination of Factory and Singleton Design Pattern