Changed the code to use the new database shema:
- topic.voteQuestions[0]. --> topic.voteQuestion.
- topic.rateQuestion.question --> topic.rateQuestion
Moved the vote and rate into there own if sentenses so that we only create the graph if the associated data exists.
Changed the rateTemplate.html because the input ids was crashing
Changed the voteTemplate.html ids to make the similar to the rateTemplate ids