ajax call for search + fixed template parser issues