Corrected indentention in main.sh; Corrected a bug with the search function, where the search critera was not quoted in the grep command