Moved search code into own activity