Added main character movement logic.