Fixed error messages and renamed target_url to url