Added usage of locks storage, fixed tests