Rewrote movement code