Optimizations and other changes.