GetClassWord/Long (based on a patch by Mike McCormack). Various fixes to the class instance handling.