Refactored to be able to handle group matches
Updated for group play