nameOrId -> appIdentity, reorder App functions
generate option structs