Large simplification: no more compiler pass, api improvement