Rating code clean up