BibRank: minor refactoring in word ranking
To merge with sorting fixes