Troubleshooting and optimizing wastewater treatment in small communities