Add missing unlock.
Remove unused variable.
Remove unused variable.
Actually use the result.
Fix invalid ptime assignement.
Get rid of the reverse hash table.