Better metadata handling