Insert block and move block seem to have some of the same code. That code should be factored out into a function that both share.