Merged changes from RatingController to work with specific key