Almost done, just need to fix empty search problem