Refactor TreeView constructors for more convenience.