Added state to the gui class.