Simplified some code in gamePlay