Clean up _parse_url and add methods