added code generation todos, and some semantic check fixmes