Refactored backward movement logic