added TabController for better flow control. removed priveous flow
control code.