Added code to group states into Sections with onEnter() and onExit()
event callbacks, as an alternative to creating composite
states/sub-machines that won't be reused.