Move operation, and lots of refactorings.