More small optimizations