New Tab class, refactor tabhandling, etc