[Scripts] Rename some functions and add user callback script hooks