Initial stages of code generation

This commit reflects up to the data clean up.