Move XHR into lib
Add searching