Added better insert tab function.