Source-related fixes.
Refactoring relation controls