Added leaving funtions for ring management and hass studd