Revert "SM optimizations"

This reverts commit b2f56751a609710eed1f143d865471fae58669b0.