Simulation moved from main to class