Shrink code given CuCN's feedback. Enforce quanta cap