adjustments for less than 5 items

* layout adjustments so less than 5 items don’t get cut off.
* do correct math using NSInteger
* more than 5 tabs start at 0 instead of central item.