Added check for RequestURI to be /.
Added comments.