Adding scripting functionality