cmdfd is no more global.
Refactor into move_row_contents.
Document stuff.