More script function conversions