Moved history settings to parent composite state from child initial state; implemented deep history; simplified example code