AMTscript.py: added minor changes and comments