replaced sys.exit with raise Exception()
Merge pull request #14 from mrsud/FSM-dev

replaced sys.exit with raise Exception()
fixed some bugs
some bugs solved