Moving functions to a separate functions.js static file.