debugging: cleaning up rewriting, adding vars initialization to varmapping _X