added missing comments.
removed duplicate remote_ip check.