Filesystem refactor