fix make-move mirroring
get rid of undeclared Var warnings by reordering functions