Added testing. Detailed search improvements