Source tree refactoring