Cleanup of simulation framework.  Simulator should now work correctly.