removing unnecessary groups and deregister function