Added support for conditional tabs

Created this pull request the right way this time.