Separate player handling code into Player class.