Fixed refactoring bugs, nicer ranking table