Update app script code