improve pagination and document URLs
handle search
simplify and remove unused code
Support a specific ref.
Integration with oauth process.