mem optimalization + fix in net headers.
this is the final shape. now only needs to make it work :)