Optimizations and palette support.