updated make and fixed unimportant malloc/free issues.