Changes for adding a rating to a resource (not finished, but works,
check comments)