tidied up HTML, moved page scripts to files