change to thread safe fsm
Merge pull request #191 from wfrench/master

Update template to us thread safe fsm