Added paging function and styling