Tournament Bracket Generator in AngularJS