Add common functions for use by all scripts