Added Factory.swift file