Add entity creation utility function