Moved functions around in helpers.js.