[metadata] Outsource functions

merge request