Changed generateSearchURL to return URL object.
Added limit field.
Removed manual getRefRec() calls.