Reverted to wangda's version of the simulator and fixed up file tree