Finish refactor of script_urls to support Flask