Refactor origin_metadata and adding provider table and logic
added documentation and new version for schema