finish function closure and re-namespacing
finish removal of window.SH variable