Where does self.type get set?  (I assume I'm just missing it, but noting for completeness)