fix superclass mismatch

and a couple of other worthwhile changes made during the investigation.