Sources hierarchy refactoring