Major debugging in the 'surface - residue distance' routine.