Fixes for movement code. Not quite there yet.