Move search into a separate .py