Remove unused type variable and allow refs.

I don't think that I broke anything, but double check.