Refactor move check inside map block