Update functions.js

Updated to the latest version on master