Minor update
Properly declared external functions now
Fixed clear_string issue (all functions clear their intended duplicate strings first)
More code cleanup