Delete tab doesn't work unless loaded as empty #29

Also did some cleanup when adding new tabs, but this must be improved
further