Adding close tab function as expected to be coded per docs. But it is buggy
unless we only have 1 tab open.