Wait for unlock deletion before sending the response

I originally had it fired separately because I didn't want everything to be so
serial if it didn't strictly need the results of an operation, but looking
back to the fact that this is security code (albeit convenient security code),
I changed it because not defaulting to convenient access in the presence of an
error is The Right Thing To Do.

There are also a couple other minor code tweaks here and there.