cleanups from msm branch