Code refactoring (Rankings)