Add query limit and remove duplicate search