Code clean up. Simulation speed can be altered with page up and page down.