Refactor TreeNodeExtensions and PageItem