synchronization with dm branch
refactoring for better compatibility with multidir settings
refactoring
method renaming
new resources