Adding some searching. Fixed bug in kRank.