Moves provenance creation into createEntity function