Fix null file name
More refactorings to allow AI matches to continue