Some tests refactoring and file system changes