moves tab management code into separate dashboard-tab.js file