Fixed the generatepages.sh mess, improved cleanup.sh