Added get_state and get_mode