URL cleaning and formatting