Fix some tests and type traits.
Fix tests to actually do what they're supposed to. Fix some more type
traits and tests.