Misc. corrections
Added hack to disable treeview popup
Gave up optimizing the model.