Moved player code into own class