Rebuild paths using Directives and implementation of memstorage with concurrency problems.

Rebuild paths using Directives and implementation of memstorage with
concurrency problems.