WIP: Metadata mining. Requires testing.