Added page numbers and fixed some small bugs