Refactor because of the TreeWigetItemJSON class.