Refactored player class