Fixing bugs in scripts, script helper, and model import