Another batch of optimizations