Fix page number calculator
pagination and template modificaitons
Pagination baby!