Reverted breaking refactor of models.js and helpers.js