Added comments on factory class