Fixes set_def, replacer, call_var, and reprcall

Also fixes test errors and makes tests pastable into cli.