Add malloc_exit() function.
Add term_strdup() function.
Modify trim_left() function.