unique_lock were being used as lock_guards. Also replaced manual lock/unlock by lock_guard for harmonization.