Core: change the tab before removing the tab widget.
Azoth AS: removed unused function.
Core: fixed tabs closing segfault.