Statechart implementation in JavaScript