Pre escape json context
Malloc error logging
Updated to build all files in dir.
Added client api functions to header.