changed the name of the file created for pages. Code is a bit crufty, needs to be refactored