patched paging on search results
cleaned up add.js. a few comments and some indenting.