Made the scripts more generic