Production, consumption, and externalities