Refactor filesystem.