Move common tasks for scriptPage to their own function.
Simplify routing definitions. Implement scriptEditMetadataPage.

Abstract some code/templates from scriptPage.
Emulated app.route('/').VERB(callback).VERB(callback) from ExpressJS 4