added MainTabControllerTest and code clean up