Topic and subtopic retrieval added w/ tests