Make average rating take into account 0s

Before this commit the average rating show did not take into account
whether or not the rating was actually there, or whether it was -1. This
commit rectifies it to become more accurate
Move header into a base template