Added an exit operation and fixed glitch if you try to close a tab and there are no tabs open