Simulator test

Embedding the simulator into Midas so that it is easy to run (just add USE_SIMULATOR to the preprocessor defines).