WIP: do library search in bg GCD thread.
Need to reimplement the expansion now