improved ui layout, solved the tableview resizing bug