Updated the expand logic and style of tableview.