Added WriteState and LinkStates actions handling to DemoGUI.