Updated engine and script lifecycle callback functions.