Optimizations for rect and flextooth