Moscow 's factories were hastily converted to military tasks : one automobile factory was turned into a submachine gun armory , a clock factory manufactured mine detonators , the chocolate factory shifted to food production for the front , and automobile repair stations worked fixing damaged tanks and military vehicles .