Redesign generation logic to use annotated interfaces