Turned many AVIM members into local variables and constants; reformatted tr() and main() a bit
Turned many AVIM members into local variables and constants; reformatted tr() and main() a bit

1ec5/avim,1ec5/avim,1ec5/avim