Search speed improvement & some bug fixes