Reformated PG2 files. Comments added to clarify the code. Buttons are labelled dynamically. Experimental AJAX and Javascript get calls added to each button