Modularized JavaScript

functions.js and nodeClient.js have been separated into separate .js
files specific to the called pages. Therefore, a given page will only
need to load the relevant JavaScript functions.