Fix pagination logic
Issue #73
Still needs improvements (this does not show the total number of pages)
Show first and last pages, and dots in pagination
Fix #73