Addeddeddded locks to sim.py
Simulator updated for pong lengthening.

Also, cleaner code.