Some minor refacturings of the Lock