Refactoring runtime tree