Use bool and early loop exit in remove_extra_symbols This changes remove_extra_symbols to use bool rather than int, and changes the nested loops to exit early when "remove_p" is set.