Refactor searchbox/notepad coupling