Merge shim.py into main.py.