Update functions.js

Beautify JS