First stab at code generator (incomplete).