Updating story-machine.js