+debug output, +hash fixes, changed where locks are acquired