Removed usage of malloc.h in favor of stdlib.h