Some fixes to state-machine.js docs