cleaned up player.js