memory management and flexible widths

I've fixed some memory management issues and also provided flexible tabbar width 
so when you have 1 item in the last tabbar , the item will not be shown in the middle of the bar