Fix script so test will pass

Remove excess vars and fix linter issues