resources: improve the entry points for finding resources and loading metadata.