Minor canidate controller refactoring

Added an abstract superclass to house common functionality.
This fixes some previously nasty cut & paste code.
Some minor style/code tweaks and fixes.