Added 'self.type' to all classes.