improve scraping of functions from tools.sh