Added entity constructor to factory