Add name and text attributes and generated class