faostat gateway refactoring