Refactor Move code part 1.
Merge pull request #1011 from ESwordTheCat/riW3nfAj

Refactor Move code part 1.