preparing ground for paths' movement; general refactorings