Removed unsused code
Disabled variable treeviews if readOnly