top scores tests and some refactoring