Started fixing the instance tree with listeners and popup menues. Work in progress.
Action listener connected to the popup menu and so on.