Metadata driver fixes and abstraction