Added a player dictionary to get rid of global variables