Fleshing out the code generation parts.