Better handling of scripts + cleaner input file names