Cleaning Up FST

Changed some of the logic on the finite state machine and cleaned out
commented-out code.