Reorganize the lock/unlock flow and add a few fixes to the view