Collect strongly related codes
Split a large method onTabClose() to small methods