Fixed a few bugs, added page numbering.