removing duplicate mongo schema factory class