Refactoring and simplifying code for nomination (bug 717495)

WiP: I need Travis' help.