Update main.js

This name is factories