Cleanup and small improvements for SH.