Refactor some tests.
Refactor the find tests.
Refactor and close views and windows in some more tests.