It's rather dangerous to assume that `type` and `shortname` are going to be second and third in the class list; there's no guarantee that they will always be like this. I'd rather see `data-` attributes being used here for this sort of thing.