cleaned up player script