Add isinstance/issubclass test/ notation and perform some cleanups.