Added support for Script mode.