adds test script
fixes root level locals
tests for globals and current variables