Fixed ratingAdd not correctly checking for existing rating. It will also now update a rating if it already exist with the new information
Refactoring and cleaning up code