Add scripting utility functions