added test for virtual file system. plus refactoring