Fixed some errors. Next we need to fix construction of EventManager in Simulation.