Tabs and Settings (also some optimization)