Refactor filesystem storage