Added the generate_urls() convenience function.