Unnest the (potentially to be removed) lock functions