Move note search to separate method