Begun refactoring TreeItem and MenuItem to reduce code maintenance.