Auto-select tabs and some cleaning
Remove old dialog code