Remove some uses of getType
No need to pass $constructor
Add compareType and change $type selector