refactor source tree