Refactored search. Made limit reset on query change.