Text this: MAC Layer Energy Consumption and Routing Protocol Optimization Algorithm for Mobile Ad Hoc Networks