starting tabs support
send selected tab in events
small refactoring