Fixed type errors related to the better checking of polymorphic types implemented by Nick. Still a few of the classes fail in type check but that is due to a bug that Nick has fixed so these should all be ok afterwards.