Outsource player class and make code more readable