start structural tweaks and add url_replace_param