Refactoring....converted from tasks back to FSMs

Todo:  need to adjust the time-keeping code so that when the simulation
is run faster than real-time, the line-detection fsm still works