Nitrogen dynamics and removal in a horizontal flow biofilm reactor for wastewater treatment.