Create gear.factory (JS)