Revert "Moved type() to parent class."

This reverts commit bea778afaa195959f116cbe2106efadbbb38708d.