Clean up resource / db handling in CoreMedia adaptor