Added Observer Pattern to notify the StateManager of menu changes