Added method to sort paths by weight. Also available in debugging menu.