Fixed store documents method return value, began to implement unit tests.