Use introspection in even more places.
Simplify a few introspection queries, remove some TODOs