polished: added commandline arguments for script and chain generator