Fixes to allow threaded db updates, unicode fix, more informative debug output.