Update magLite.js

giving factory it's own context