Cleaned up event subscription/unsubscription for server states.