Apply more optimizations and tweaks.