Commented code and refactored a few things.
Put the TreeView and preview window inside of a split view.