source tree refactor