Various API changes related to code gen