remove invalid resource types from the metadata

We have seen several mlses list a Resource type in the metadata, but
then never reference in the list of classes. This breaks our
metadata, as we assumed all resources had a class. This fixes that
potential bug.
Ah, alright, we need to add method `as_hash`