Program now keeps running smoothly while a simulation is running with a low framerate