Refactored treeView and created treeHelper.
ran jshint
Merge pull request #111 from darkowlzz/refactor

Refactor