Biological wastewater treatment systems commonly use ammonification and nitrification to remove nitrogenous substances from sewage. Ammonification converts amino acids, proteins, and other nitrogen sources to ammonia or ammonium salts, while nitrification converts ammonia or ammonium salts to nitrates. These biological processes are typical of many wastewater treatment systems using biological components. Biological processes for nitrogen removal can be co-opted and integrated into systems for reuse to produce products, energy or for ecological services. Biological phosphorus removal can be accomplished using phosphorus-accumulating organisms such as activated-sludge bacteria in an anaerobic/aerobic system, membranes with microbial biofilms, or algae in an aerobic lagoon system.