Optimizing Wastewater Treatment with Membrane Bioreactor Technology