Refractor, now tabs are objects
Use dictionary for tabs
Small refractor for getTabs