Refactored packages and new generic TreeNode interface