Revert "Removed states, completed move code"

This reverts commit d2730d9972d846c4ede7e8f0bd4053f3af019529.