Added a constructor that takes a list of entities only.