When an order is shipped, a notification email is sent to the customer. If there is a tracking URL, it is included in the email. (and also a bit of refactoring)