Adjust scripts to download and uncompress functions. Fix functions.