Updated for code review feedback. Updated to latest sm.net bits.