Add common functions script