Move command generation, display, sanity check to machine.c.