Implements previous next methods.
Implements tab switching.