Wrote the movement tests, and did some refactoring.