Small change to Factory to make it less property dependent.
Inserted missing public keyword.