The main changes is add the simulator

other classes are just small changes, can ignore them