Refactoring tree view class, included a new class object to handle
connections.