Refactored code. Added player skeleton