Refactor folder data tranning