Added some safety to the Locks and made a simple test