Made scripts more generic