Fixed bugs for defs such as %0 and %1
Building better test scripts