Refactoring of FileHandling and filter specs