Rework op_lifter to cover more cases and add some new op optimizations.