refine the whole folder struct