Rewrites vars