Make script more generic.