Added inheritance to validation and generation