Refactored TREC topic classes; added test cases; simplified ivy dependencies.