Is this doing what you intend?  From what I remember, `type = type` will create a local variable, `type`, and assign it to whatever is returned by calling `self.type`.  But I'm not sure what your intentions are here even if that isn't what you meant.