Refactor of player class and tests