Functions are now passed current script as first parameter