Cleanup legacy codes.py usage.
Merge pull request #622 from jmaas/master

Cleanup legacy codes.py usage.