fixed bug favorite candidates deletion
cleaning up code