Refactored code, player can move now