Refactor so tabs preserve order
rebuild