Deregistration implemented, along with basic exception handling.