Minor name changes for variables. Also bug fix.

Naming was changed to make things more clear.

Bug: Rejected candidates were not proposing to their next best
candidates. This caused the script to loop forever.

This seems to work now. Need to test/validate.