Cleans up render_url method