Set up to resolve #109 and #190

Buttons, queries and paging variables set up to resolve #109 and #190