Capitalism and the factory system