Adding txt file generation for pages. Misc changes