Added Tabs

Added the tab control and some code adjustment in the core as well.
Core changes should not affect legacy code.