Update factories.js