Refactor metadata and remove deprecation warning