Factor out candidates serialization
Factor out Candidate queries