File system refactor