Adds a constructor for indexContainer.