clean up restore.py
expose process_cases as a main entry point more intentionally