refactored DocumentFinder, adding support for ignoring the current window