Feature/refactor metadata