Restructure data in yaml file