Encapsulated state machine and provides a constructor.
added a destructor for state machines.
Updated README.
Merge pull request #4 from antoinealb/issue-1-fsm-encapsulate

Fix issue #1 (really).