Update functions.js

Revert changes from last push.