Refactored Tabset code into coherent classes