moved ajax for getting candidates to Candidates.js --Ravi