More minor optimizations