Added scripting functionality