Template changes, bugfixed get_rank when no Byes present