Completed main locking framework.