This change fixes some subtle state bugs in the switch handling by making isOn a direct function of the Tunnel.