Adding GrubFactory.js, modify related files