Refactored filetree to allow for context menus and duplicate filetrees.