cleanup
cleanup
Avoid copying of immutable arrays
Optimized conditions order