Pagination added & Sorted the code a little so it makes more sense to me.