Fixed leaks, added ethernet headers