Modified source to work with new structure.

This just fixes all the imports and file paths in the files so that things
work. It also fixes the same stuff in the docs and docstrings to reflect the
new structure. It also merges some key files in the top level directory. It
also adds some basic codegen docs.