Logic improved.

New: Using Finite state automata model in menu choose process instead of GOTO.