Clean-up.
Improved logging.
Renamed LICENSE to LICENSE.txt.
Fixed crash with sql_get_stat and sql_get_charset.