Cleanup legacy codes.py usage.