Add Documents

Added the TreeView.php
Updated lines of code to consolidate flow and make things neat