Added remove_duplicates and modifed print_list