Explain the use of __slot__ and remove code duplication in sorting scores