Refactor code by extracting tab control from html to a new PanelController