Beginning of code generation. Modifying internal representation to make code generation easier.