Started simplifying the rank calculation algorithms: removed unused functionality, simplified signature of doitall() function.