Added entity factory