more refactoring + clean up initial ranking computation + removed leaf/parentless cache