Refactor Yaml file parsing and service method definitions