clean up shareglrm code