Refactor tab code

Tab code is much more transparent now. Each tab has its own content div.