Added script generation functions.