From waste to energy to pollution