Some fixes and cleanup
Move get_urls() logic to save_rules()
Better cache