added pages, js code to distinguish question types, etc