Minor optimizations to array usage.