Tab handling improved. Need to handle what happens on save---tabs change names.