improved rewrites in apptimizer
also better handling of rules/coupons with regard to save