Merge pull request #621 from jmaas/master

Remove unused Yaml imports.
Cleanup legacy codes.py usage.