A framework for making it easier to write tools for MSM