Refactor interactive search