Remove copies.
Add docstrings to codegen namespace.