Refactored fingerprint ranking method.