Adding view/edit form to tree popup, misc. cleanup