Fixed some typos to Make sure the last-state mechanism worked as intended
(probably) fixed RunCommand() function and definitely fixed CheckController()
Uncommented while loop.
removed some redundant code
Added credit to function headers
Commented out ControlRun (Which really needs to be threaded to work properly