Alllmost got the all_varieties code to work. Should resolve the ordering
problem before finishing it.