Improve creation of tabs