refactor modification to move commands (G0, G1)