Updated GenFSM

Fixed doc typos. Updated example code to handle more cases and removed an unneeded state.