Move search out of lines and into component