Adds a check to stop treeList at the second last item instead of allowing the list index to go negative. Fixes#17