Upgrades to allow a stop button and a pause button.

Improved code and comments slightly
Additional comments