Wrote framework for MacroSimulator