Polishing the final changes.

The changes in b44018d374 were introduced in a rush, during review in lab. I polished them a bit, introducing a little of documentation and re-formatting.

Moreover, a small but significant fix is introduced in AgProcess.startCandidate(), preventing the candidate process to be started twice.