Implemented page statistics
Fixing some bugs in the TeX parsing
Page counts on chapter pages

And a bug