Use Events class instead of hard-coded events
Use event to create shipment and inventory units