Adding a constructor for Entity.