library: Add callback, use traditional query params
Looks like a lot of changes, just because we switched from
$.getJSON to $.ajax and indented the callback function.
Also added the pageComplete callback option.