Searching with threads no more blocking ida, and code refactoring