refactored main loop, used TabList/Tab objects to clean it up - also added TabController.createTabs