update rating ajax
clean up unused code