Attempt at the start of refactoring the move grid stuff.