Code from GAS scripts