More API work for code gen