Adding TabBar

Adding a TabBar and correcting problems linked to it.