Refactor folder framework