Small cleanups to filesystem code