lots of changes to make spree 1.3-friendly