Fixed a bunch of stuff to do with the pages app