changed main script to remove unneeded directories and tar needed files for the user