Updated README.
Fixed some type warnings.
Remember to free prev_name if it is allocated.
Added some debug messages.
Formatting.
Only print SQLite debug messages when compiled for it.