Added code for the code generator. Prelim _init methods written, questions inline for Dale.