Extracting sublist_top_n, adding tests