more cleanup and delete registration