Refactoring, minor cleanup and documenting of findDsr code.

* Doesn't change any reporting of syntactic/semantic errs so far
  but has potential to fix some erroneous reporting on some
  pages.

Change-Id: Ie6988d8d752b7026bc4642c4058c177748ff2a5b
Merge "Refactoring, minor cleanup and documenting of findDsr code."