Optimizations on switches in elementary.