Fix completion
Fix page/perPage to offset/max in json and code
Add max parameter to completion query
Cleanup