An even better way to avoid globals is to use this run handler ...
on run
try
my main()
on error errText number errNr
if errNr = -128 then
return
else if errNr = -2700 then
my showInstruction(errText)
else
my showError(errText, errNr)
end if
end try
end run
which simply has no variables, global or otherwise.