added delete functionality and bugfixes for tree view. RUN  MIGRATION