changed makefile to optimize as well as printstatements and freeing packets