Better move implementation. Tests pass.