Better tab handling.

TODO: only load content when tab is active.