Some refactoring
removing new tab on closing