tab windows mostly done, ugly and needs refactoring