removed some debugging code, clenups, and fix for a memory leak.
removed some debugging code, clenups, and fix for a memory leak.

cention-nazri/libdbi-drivers,cention-nazri/libdbi-drivers,cention-nazri/libdbi-drivers,cention-nazri/libdbi-drivers