Issue dummy query when going beyond the last page.
Make conditions for if and elsif more consistent.
Change "Last page" to "Last partial page" to explain the ">".