Code tweaks to export pages