Add the possibility to define tab views as a function