Added Start and Stop buttons

General debugging, added ability to start and stop the stream. Buttons
disable when they would cause errors in scripts to prevent the program
from breaking. Broke up some code into functions.
Modified comments.