Added square root-based scoring.