Make player unable to change direction in air

Refactor player in own JS file