Changed createTabs to generate session instead of main loop code and added option param to tabList

Renamed createTabs to saveTabList