Merge FactoryPattern to master

factory solution and singleton solution are finshed in developping we have to merge it to the master branch