Fixed implementation of player class