Expanded code so that more than one tournament is possible.