what year is your e36?
disconnecting battery to erase codes and reset ECU only works with cars 1995 and below... 1996 and newer cars you need a scanner to clear codes.
but in your no-start case... i would say go back to the connector wires on the MAF. carefully clean them, reconnect and try again.
Take a closer look at your filter box... you might have a blockage in the intake box itself(before the filter)
**you said: "all it does is when u turn the key the lights will come on but no go all it does is flash the hazzards.
Upon reconnection, turn off ignition to OFF. close all doors(windows up). make sure trunk and hood is securely locked; and lock the car from the driver's side.
Wait a few minutes, open the door, and start.