some tidy up on the shipments code