Made the GenerateCode piece for expressions more flexible.