Added simple logic for rating peers.