Text this: Cross Layer Optimization and Simulation of Smart Grid Home Area Network