Replace "clazz" with "type" absolutely everywhere